﻿namespace Wedn.Model.Data
{
    /// <summary>
    /// 用户信息表模型类(初步审核通过)
    /// </summary>
    public class User
    {
        #region 所有字段
        private int id;
        private string login;
        private string nickName;
        private string password;
        private string email;
        private string url;
        private string regDate;
        private string avatar;
        private int status;
        private int role;
        private string cdkey;
        private string description;
        #endregion

        #region 对外公共属性
        /// <summary>
        /// 主键(自增长)字段
        /// </summary>
        public int Id
        {
            get { return id; }
            set { id = value; }
        }
        /// <summary>
        /// 用户登录名字段
        /// </summary>
        public string Login
        {
            get { return login; }
            set { login = value; }
        }
        /// <summary>
        /// 用户昵称字段
        /// </summary>
        public string NickName
        {
            get { return nickName; }
            set { nickName = value; }
        }
        /// <summary>
        /// 用户密码字段
        /// </summary>
        public string Password
        {
            get { return password; }
            set { password = value; }
        }
        /// <summary>
        /// 用户电子邮箱地址字段
        /// </summary>
        public string Email
        {
            get { return email; }
            set { email = value; }
        }
        /// <summary>
        /// 用户个人主页链接字段
        /// </summary>
        public string Url
        {
            get { return url; }
            set { url = value; }
        }
        /// <summary>
        /// 用户注册时间字段
        /// </summary>
        public string RegDate
        {
            get { return regDate; }
            set { regDate = value; }
        }
        /// <summary>
        /// 用户照片(头像)字段
        /// </summary>
        public string Avatar
        {
            get { return avatar; }
            set { avatar = value; }
        }
        /// <summary>
        /// 用户当前状态(0:正常, 1:待审核, 2:待验证)字段
        /// </summary>
        public int Status
        {
            get { return status; }
            set { status = value; }
        }
        /// <summary>
        /// 用户所属角色(0:管理员,1:撰写人,2:订阅者)字段
        /// </summary>
        public int Role
        {
            get { return role; }
            set { role = value; }
        }
        /// <summary>
        /// 用户个人说明字段
        /// </summary>
        public string CDKey
        {
            get { return cdkey; }
            set { cdkey = value; }
        }
        /// <summary>
        /// 用户个人说明字段
        /// </summary>
        public string Description
        {
            get { return description; }
            set { description = value; }
        }
        #endregion

        #region 构造函数
        public User() { }
        /// <summary>
        /// 用户信息表模型类构造函数
        /// </summary>
        /// <param name="id">用户表ID</param>
        /// <param name="loginName">用户登录名</param>
        /// <param name="nickName">用户昵称</param>
        /// <param name="password">用户密码</param>
        /// <param name="email">用户电子邮箱地址</param>
        /// <param name="url">用户个人主页地址</param>
        /// <param name="regDate">用户注册时间</param>
        /// <param name="avatar">用户头像</param>
        /// <param name="status">用户当前状态(0:正常, 1:待审核, 2:待验证)</param>
        /// <param name="role">用户权限(0:管理员,1:撰写人,2:订阅者)</param>
        /// <param name="cdkey">用户验证码</param>
        /// <param name="description">用户个人说明</param>
        public User(int id, string loginName, string nickName, string password, string email, string url, string regDate, string avatar, int status, int role, string cdkey, string description)
        {
            this.id = id;
            this.login = loginName;
            this.nickName = nickName;
            this.password = password;
            this.email = email;
            this.url = url;
            this.regDate = regDate;
            this.avatar = avatar;
            this.status = status;
            this.role = role;
            this.cdkey = cdkey;
            this.description = description;
        }
        #endregion
    }
}
